const Koa=require('koa');
const app=new Koa();

app.use(ctx=>{
    ctx.body=JSON.stringify({
        url:ctx.url,
        query:ctx.query,
        qs:ctx.querystring
    },null,2);
});

app.listen(4000,()=>{
    console.log('Koa2 port:4000----'+new Date().toLocaleTimeString());
});